/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * PanelOpcionInicio.java
 *
 * Created on Apr 17, 2011, 10:01:41 PM
 */

package frontera.interfaz.panel;

import javax.swing.Action;

/**
 *
 * @author tuareg
 */
public class PanelOpcionInicio extends javax.swing.JPanel {

    /** Creates new form PanelOpcionInicio */
    public PanelOpcionInicio(Action a) {
        initComponents();
        boton.setAction(a);
        label.setText((String) a.getValue(Action.SHORT_DESCRIPTION));
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        boton = new javax.swing.JButton();
        label = new javax.swing.JLabel();

        setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        boton.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                botonMouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                botonMouseExited(evt);
            }
        });
        add(boton, new org.netbeans.lib.awtextra.AbsoluteConstraints(60, 10, 130, 120));

        label.setFont(new java.awt.Font("Dialog", 0, 11)); // NOI18N
        label.setForeground(new java.awt.Color(0, 0, 0));
        label.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        add(label, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 140, 240, 17));
    }// </editor-fold>//GEN-END:initComponents

    private void botonMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_botonMouseEntered
        //label.setFont(new java.awt.Font("Dialog", 1, 12));
    }//GEN-LAST:event_botonMouseEntered

    private void botonMouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_botonMouseExited
        //label.setFont(new java.awt.Font("Dialog", 0, 11));
    }//GEN-LAST:event_botonMouseExited


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton boton;
    private javax.swing.JLabel label;
    // End of variables declaration//GEN-END:variables

}
